<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>General</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="kvaser.gif"/></td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__can__general.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">General<div class="ingroups"><a class="el" href="group__grp__canlib.html">CANlib</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Initialization, reading versions and other information.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gaff1ec1d3416d3bdd56336a7b9ac008b1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__general.html#gaff1ec1d3416d3bdd56336a7b9ac008b1">canInitializeLibrary</a> (void)</td></tr>
<tr class="separator:gaff1ec1d3416d3bdd56336a7b9ac008b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2cf37192c855ce901fc0d69bfe72fbd5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="canstat_8h.html#a52b5e5c71832b0bd3c6a5b1fd48583e7">canStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__general.html#ga2cf37192c855ce901fc0d69bfe72fbd5">canEnumHardwareEx</a> (int *channelCount)</td></tr>
<tr class="separator:ga2cf37192c855ce901fc0d69bfe72fbd5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga01a7a415c95c579750bcdd95a1d245c4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="canstat_8h.html#a52b5e5c71832b0bd3c6a5b1fd48583e7">canStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__general.html#ga01a7a415c95c579750bcdd95a1d245c4">canGetErrorText</a> (<a class="el" href="canstat_8h.html#a52b5e5c71832b0bd3c6a5b1fd48583e7">canStatus</a> err, char *buf, unsigned int bufsiz)</td></tr>
<tr class="separator:ga01a7a415c95c579750bcdd95a1d245c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafb5688859c56ecb6f8d85705d3ec2f14"><td class="memItemLeft" align="right" valign="top">unsigned short&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__general.html#gafb5688859c56ecb6f8d85705d3ec2f14">canGetVersion</a> (void)</td></tr>
<tr class="separator:gafb5688859c56ecb6f8d85705d3ec2f14"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaeaa24db97af22478ca51d48636c7bb12"><td class="memItemLeft" align="right" valign="top"><a class="el" href="canstat_8h.html#a52b5e5c71832b0bd3c6a5b1fd48583e7">canStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__general.html#gaeaa24db97af22478ca51d48636c7bb12">canIoCtl</a> (const <a class="el" href="canlib_8h.html#a75f2e3a4c7b1e47c8c6b25b76975b510">CanHandle</a> hnd, unsigned int func, void *buf, unsigned int buflen)</td></tr>
<tr class="separator:gaeaa24db97af22478ca51d48636c7bb12"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga65169ca633cd30aa92b8a80e28a5378b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="canstat_8h.html#a52b5e5c71832b0bd3c6a5b1fd48583e7">canStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__general.html#ga65169ca633cd30aa92b8a80e28a5378b">canGetNumberOfChannels</a> (int *channelCount)</td></tr>
<tr class="separator:ga65169ca633cd30aa92b8a80e28a5378b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab9552d1a588b0dbc144b097acba017b2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="canstat_8h.html#a52b5e5c71832b0bd3c6a5b1fd48583e7">canStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__general.html#gab9552d1a588b0dbc144b097acba017b2">canGetChannelData</a> (int channel, int item, void *buffer, size_t bufsize)</td></tr>
<tr class="separator:gab9552d1a588b0dbc144b097acba017b2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0803bc56e8695150563a48df2c14db5f"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__general.html#ga0803bc56e8695150563a48df2c14db5f">canGetVersionEx</a> (unsigned int itemCode)</td></tr>
<tr class="separator:ga0803bc56e8695150563a48df2c14db5f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0d1c0e54ea20c3e3b328a32eb10c7b47"><td class="memItemLeft" align="right" valign="top"><a class="el" href="canstat_8h.html#a52b5e5c71832b0bd3c6a5b1fd48583e7">canStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__general.html#ga0d1c0e54ea20c3e3b328a32eb10c7b47">canUnloadLibrary</a> (void)</td></tr>
<tr class="separator:ga0d1c0e54ea20c3e3b328a32eb10c7b47"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad3d0fc1bf752047f6e24020c478aeffd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="canstat_8h.html#a52b5e5c71832b0bd3c6a5b1fd48583e7">canStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__general.html#gad3d0fc1bf752047f6e24020c478aeffd">kvFlashLeds</a> (const <a class="el" href="canlib_8h.html#a75f2e3a4c7b1e47c8c6b25b76975b510">CanHandle</a> hnd, int action, int timeout)</td></tr>
<tr class="separator:gad3d0fc1bf752047f6e24020c478aeffd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1c6db083e9def9c4d38b4a5226b5f77c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="canstat_8h.html#a52b5e5c71832b0bd3c6a5b1fd48583e7">canStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__general.html#ga1c6db083e9def9c4d38b4a5226b5f77c">kvAnnounceIdentityEx</a> (const <a class="el" href="canlib_8h.html#a75f2e3a4c7b1e47c8c6b25b76975b510">CanHandle</a> hnd, int type, void *buf, size_t bufsiz)</td></tr>
<tr class="separator:ga1c6db083e9def9c4d38b4a5226b5f77c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga99976c5b8e2c534b27bf9ec2e715d8d3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="canstat_8h.html#a52b5e5c71832b0bd3c6a5b1fd48583e7">kvStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__general.html#ga99976c5b8e2c534b27bf9ec2e715d8d3">kvSetNotifyCallback</a> (const <a class="el" href="canlib_8h.html#a75f2e3a4c7b1e47c8c6b25b76975b510">CanHandle</a> hnd, <a class="el" href="canlib_8h.html#a7e926c0359a2caa6b9a663a333bab78d">kvCallback_t</a> callback, void *context, unsigned int notifyFlags)</td></tr>
<tr class="separator:ga99976c5b8e2c534b27bf9ec2e715d8d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga76cb21c1b104f9b679caa3f4cda7424d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="canstat_8h.html#a52b5e5c71832b0bd3c6a5b1fd48583e7">kvStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__general.html#ga76cb21c1b104f9b679caa3f4cda7424d">kvGetSupportedInterfaceInfo</a> (int index, char *hwName, size_t nameLen, int *hwType, int *hwBusType)</td></tr>
<tr class="separator:ga76cb21c1b104f9b679caa3f4cda7424d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4a754a72cb9497994b6bc9133ee62282"><td class="memItemLeft" align="right" valign="top"><a class="el" href="canstat_8h.html#a52b5e5c71832b0bd3c6a5b1fd48583e7">kvStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__general.html#ga4a754a72cb9497994b6bc9133ee62282">kvReadDeviceCustomerData</a> (const <a class="el" href="canlib_8h.html#a75f2e3a4c7b1e47c8c6b25b76975b510">CanHandle</a> hnd, int userNumber, int itemNumber, void *data, size_t bufsiz)</td></tr>
<tr class="separator:ga4a754a72cb9497994b6bc9133ee62282"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8ec3c64b63e50ff210294001bdbad7c3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="canstat_8h.html#a52b5e5c71832b0bd3c6a5b1fd48583e7">kvStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__general.html#ga8ec3c64b63e50ff210294001bdbad7c3">kvDeviceSetMode</a> (const <a class="el" href="canlib_8h.html#a75f2e3a4c7b1e47c8c6b25b76975b510">CanHandle</a> hnd, int mode)</td></tr>
<tr class="separator:ga8ec3c64b63e50ff210294001bdbad7c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2f80c456dd1653ffe8a9062de3e1ad76"><td class="memItemLeft" align="right" valign="top"><a class="el" href="canstat_8h.html#a52b5e5c71832b0bd3c6a5b1fd48583e7">kvStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__general.html#ga2f80c456dd1653ffe8a9062de3e1ad76">kvDeviceGetMode</a> (const <a class="el" href="canlib_8h.html#a75f2e3a4c7b1e47c8c6b25b76975b510">CanHandle</a> hnd, int *result)</td></tr>
<tr class="separator:ga2f80c456dd1653ffe8a9062de3e1ad76"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0671078a6184ab2b73287946a49763f2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="canstat_8h.html#a52b5e5c71832b0bd3c6a5b1fd48583e7">kvStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__general.html#ga0671078a6184ab2b73287946a49763f2">kvReadTimer</a> (const <a class="el" href="canlib_8h.html#a75f2e3a4c7b1e47c8c6b25b76975b510">CanHandle</a> hnd, unsigned int *time)</td></tr>
<tr class="separator:ga0671078a6184ab2b73287946a49763f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafa060c0f78d459498d1f6236e2d0b5ae"><td class="memItemLeft" align="right" valign="top"><a class="el" href="canstat_8h.html#a52b5e5c71832b0bd3c6a5b1fd48583e7">kvStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__general.html#gafa060c0f78d459498d1f6236e2d0b5ae">kvReadTimer64</a> (const <a class="el" href="canlib_8h.html#a75f2e3a4c7b1e47c8c6b25b76975b510">CanHandle</a> hnd, uint64_t *time)</td></tr>
<tr class="separator:gafa060c0f78d459498d1f6236e2d0b5ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Initialization, reading versions and other information. </p>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga2cf37192c855ce901fc0d69bfe72fbd5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga2cf37192c855ce901fc0d69bfe72fbd5">&#9670;&nbsp;</a></span>canEnumHardwareEx()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="canstat_8h.html#a52b5e5c71832b0bd3c6a5b1fd48583e7">canStatus</a> canEnumHardwareEx </td>
          <td>(</td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>channelCount</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">channelCount</td><td>Number of channels present.</td></tr>
  </table>
  </dd>
</dl>
<p>This function will re-enumerate all currently available CAN channels while not affecting already opened channel handles.</p>
<dl class="section note"><dt>Note</dt><dd>When using this function, make sure your program does not keep any references to CANlib channel numbers since these numbers may change.<br />
 On Linux, no re-enumeration is needed since enumeration takes place when a device is plugged in or unplugged.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="page_user_guide_init.html#section_user_guide_enumerate_hw">Manually Enumerating CAN channels</a> </dd></dl>

</div>
</div>
<a id="gab9552d1a588b0dbc144b097acba017b2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab9552d1a588b0dbc144b097acba017b2">&#9670;&nbsp;</a></span>canGetChannelData()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="canstat_8h.html#a52b5e5c71832b0bd3c6a5b1fd48583e7">canStatus</a> canGetChannelData </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>channel</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>item</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>bufsize</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function can be used to retrieve certain pieces of information about a channel.</p>
<dl class="section note"><dt>Note</dt><dd>You must pass a channel number and not a channel handle.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">channel</td><td>The number of the channel you are interested in. Channel numbers are integers in the interval beginning at 0 (zero) and ending at the value returned by <a class="el" href="group__can__general.html#ga65169ca633cd30aa92b8a80e28a5378b">canGetNumberOfChannels()</a> minus 1. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">item</td><td>This parameter specifies what data to obtain for the specified channel. The value is one of the constants <a class="el" href="canlib_8h.html#canCHANNELDATA_xxx">canCHANNELDATA_xxx</a>. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">buffer</td><td>The address of a buffer which is to receive the data. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">bufsize</td><td>The size of the buffer to which the buffer parameter points.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="canstat_8h.html#a52b5e5c71832b0bd3c6a5b1fd48583e7a49743d0d438957118b9c6af2e831b209">canOK</a> (zero) if success </dd>
<dd>
<a class="el" href="canstat_8h.html#canERR_xxx">canERR_xxx</a> (negative) if failure</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="page_user_guide_device_and_channel.html#section_user_guide_unique_device">Channel Information</a> </dd>
<dd>
<a class="el" href="group__can__general.html#ga65169ca633cd30aa92b8a80e28a5378b">canGetNumberOfChannels()</a> </dd>
<dd>
<a class="el" href="group___c_a_n.html#ga909e5c14b09fe76bad280475138d503e">canGetHandleData()</a> </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="how-to_2c_2list_channels_8c-example.html#a3">how-to/c/listChannels.c</a>, and <a class="el" href="list_channels_8c-example.html#a7">listChannels.c</a>.</dd>
</dl>
</div>
</div>
<a id="ga01a7a415c95c579750bcdd95a1d245c4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga01a7a415c95c579750bcdd95a1d245c4">&#9670;&nbsp;</a></span>canGetErrorText()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="canstat_8h.html#a52b5e5c71832b0bd3c6a5b1fd48583e7">canStatus</a> canGetErrorText </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="canstat_8h.html#a52b5e5c71832b0bd3c6a5b1fd48583e7">canStatus</a>&#160;</td>
          <td class="paramname"><em>err</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>bufsiz</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function translates an error code (<a class="el" href="canstat_8h.html#canERR_xxx">canERR_xxx</a>) to a human-readable, English text.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">err</td><td>The error code. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">buf</td><td>The buffer which is to receive the text, which is a zero-terminated string (provided the buffer is large enough.) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">bufsiz</td><td>The length of the input buffer.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="canstat_8h.html#a52b5e5c71832b0bd3c6a5b1fd48583e7a49743d0d438957118b9c6af2e831b209">canOK</a> (zero) if success </dd>
<dd>
<a class="el" href="canstat_8h.html#canERR_xxx">canERR_xxx</a> (negative) if failure</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="page_user_guide_intro.html#section_user_guide_canstatus">Error checking</a> </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="busparams_8c-example.html#a1">busparams.c</a>, <a class="el" href="cancount_8c-example.html#a1">cancount.c</a>, <a class="el" href="canfdmonitor_8c-example.html#a1">canfdmonitor.c</a>, <a class="el" href="canfdwrite_8c-example.html#a1">canfdwrite.c</a>, <a class="el" href="canmonitor_8c-example.html#a1">canmonitor.c</a>, <a class="el" href="example_2c_2busparams_tq_8c-example.html#a1">example/c/busparams_tq.c</a>, <a class="el" href="how-to_2c_2list_channels_8c-example.html#a2">how-to/c/listChannels.c</a>, <a class="el" href="how-to_2c_2open_channels_8c-example.html#a1">how-to/c/openChannels.c</a>, <a class="el" href="list_channels_8c-example.html#a1">listChannels.c</a>, <a class="el" href="read_timer_test_8c-example.html#a1">readTimerTest.c</a>, <a class="el" href="simplewrite_8c-example.html#a1">simplewrite.c</a>, <a class="el" href="tutorial_2c_2_monitor_can_channel_8c-example.html#a1">tutorial/c/MonitorCanChannel.c</a>, <a class="el" href="tutorial_2c_2_send_message_8c-example.html#a1">tutorial/c/SendMessage.c</a>, and <a class="el" href="writeloop_8c-example.html#a1">writeloop.c</a>.</dd>
</dl>
</div>
</div>
<a id="ga65169ca633cd30aa92b8a80e28a5378b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga65169ca633cd30aa92b8a80e28a5378b">&#9670;&nbsp;</a></span>canGetNumberOfChannels()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="canstat_8h.html#a52b5e5c71832b0bd3c6a5b1fd48583e7">canStatus</a> canGetNumberOfChannels </td>
          <td>(</td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>channelCount</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function returns the number of available CAN channels in the computer. The virtual channels are included in this number.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">channelCount</td><td>A pointer to a <code>DWORD</code> which will receive the current number of channels.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="canstat_8h.html#a52b5e5c71832b0bd3c6a5b1fd48583e7a49743d0d438957118b9c6af2e831b209">canOK</a> (zero) if success </dd>
<dd>
<a class="el" href="canstat_8h.html#canERR_xxx">canERR_xxx</a> (negative) if failure</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="page_user_guide_device_and_channel.html#section_user_guide_unique_device">Channel Information</a>, <a class="el" href="page_user_guide_device_and_channel.html#section_user_guide_virtual">Virtual Channels</a> </dd>
<dd>
<a class="el" href="group__can__general.html#gab9552d1a588b0dbc144b097acba017b2">canGetChannelData()</a> </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="how-to_2c_2list_channels_8c-example.html#a0">how-to/c/listChannels.c</a>, and <a class="el" href="list_channels_8c-example.html#a6">listChannels.c</a>.</dd>
</dl>
</div>
</div>
<a id="gafb5688859c56ecb6f8d85705d3ec2f14"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gafb5688859c56ecb6f8d85705d3ec2f14">&#9670;&nbsp;</a></span>canGetVersion()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned short canGetVersion </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This API call returns the version of the CANlib API DLL (canlib32.dll). The most significant byte is the major version number and the least significant byte is the minor version number.</p>
<p>The actual version of the different driver files can be obtained by studying the version resources in each of the files.</p>
<dl class="section note"><dt>Note</dt><dd>The version number of the canlib32.dll file is not related to the product version of CANlib you are using. CANlib consists of several driver and DLL files. To obtain the product version, use <a class="el" href="group__can__general.html#ga0803bc56e8695150563a48df2c14db5f">canGetVersionEx()</a>.</dd></dl>
<dl class="section return"><dt>Returns</dt><dd>version number of canlib32.dll</dd></dl>
<dl class="section note"><dt>Note</dt><dd>Linux returns version number from libcanlib.so</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="page_user_guide_version.html">Version Checking</a> </dd>
<dd>
<a class="el" href="group__can__general.html#ga0803bc56e8695150563a48df2c14db5f">canGetVersionEx()</a> </dd></dl>

</div>
</div>
<a id="ga0803bc56e8695150563a48df2c14db5f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0803bc56e8695150563a48df2c14db5f">&#9670;&nbsp;</a></span>canGetVersionEx()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int canGetVersionEx </td>
          <td>(</td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>itemCode</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function returns various version numbers from the driver routines.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">itemCode</td><td>Specifies which version number to retrieve. See <a class="el" href="canlib_8h.html#canVERSION_CANLIB32_xxx">canVERSION_CANLIB32_xxx</a></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The return value is desired version number.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="page_user_guide_version.html">Version Checking</a> </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="list_channels_8c-example.html#a3">listChannels.c</a>.</dd>
</dl>
</div>
</div>
<a id="gaff1ec1d3416d3bdd56336a7b9ac008b1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaff1ec1d3416d3bdd56336a7b9ac008b1">&#9670;&nbsp;</a></span>canInitializeLibrary()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void canInitializeLibrary </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function must be called before any other functions is used. It will initialize the driver.</p>
<p>You may call <a class="el" href="group__can__general.html#gaff1ec1d3416d3bdd56336a7b9ac008b1">canInitializeLibrary()</a> more than once. The actual initialization will take place only once.</p>
<p>Any errors encountered during library initialization will be "silent" and an appropriate <a class="el" href="canstat_8h.html#canERR_xxx">canERR_xxx</a> error code will be returned later on when <a class="el" href="group___c_a_n.html#gac377d182232fb4ec2fed881c2b9ab300">canOpenChannel()</a> (or any other API call that requires initialization) is called.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="page_user_guide_init.html">Initialization</a> </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="busparams_8c-example.html#a2">busparams.c</a>, <a class="el" href="cancount_8c-example.html#a2">cancount.c</a>, <a class="el" href="canfdmonitor_8c-example.html#a2">canfdmonitor.c</a>, <a class="el" href="canfdwrite_8c-example.html#a2">canfdwrite.c</a>, <a class="el" href="canmonitor_8c-example.html#a14">canmonitor.c</a>, <a class="el" href="example_2c_2busparams_tq_8c-example.html#a3">example/c/busparams_tq.c</a>, <a class="el" href="list_channels_8c-example.html#a2">listChannels.c</a>, <a class="el" href="read_timer_test_8c-example.html#a2">readTimerTest.c</a>, <a class="el" href="simplewrite_8c-example.html#a14">simplewrite.c</a>, <a class="el" href="tutorial_2c_2_monitor_can_channel_8c-example.html#a5">tutorial/c/MonitorCanChannel.c</a>, <a class="el" href="tutorial_2c_2_send_message_8c-example.html#a2">tutorial/c/SendMessage.c</a>, and <a class="el" href="writeloop_8c-example.html#a2">writeloop.c</a>.</dd>
</dl>
</div>
</div>
<a id="gaeaa24db97af22478ca51d48636c7bb12"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaeaa24db97af22478ca51d48636c7bb12">&#9670;&nbsp;</a></span>canIoCtl()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="canstat_8h.html#a52b5e5c71832b0bd3c6a5b1fd48583e7">canStatus</a> canIoCtl </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="canlib_8h.html#a75f2e3a4c7b1e47c8c6b25b76975b510">CanHandle</a>&#160;</td>
          <td class="paramname"><em>hnd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>buflen</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This API call performs several different functions (<a class="el" href="canlib_8h.html#canIOCTL_xxx">canIOCTL_xxx</a>). The functions are handle-specific unless otherwise noted; this means that they affect only the handle you pass to <a class="el" href="group__can__general.html#gaeaa24db97af22478ca51d48636c7bb12">canIoCtl()</a>, whereas other open handles will remain unaffected. The contents of <em>buf</em> after the call is dependent on the function code you specified.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">hnd</td><td>A handle to an open circuit. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">func</td><td>A <a class="el" href="canlib_8h.html#canIOCTL_xxx">canIOCTL_xxx</a> function code </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">buf</td><td>Pointer to a buffer containing function-dependent data; or a <code>NULL</code> pointer for certain function codes. The buffer can be used for both input and output depending on the function code. See <a class="el" href="canlib_8h.html#canIOCTL_xxx">canIOCTL_xxx</a>. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">buflen</td><td>The length of the buffer.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="canstat_8h.html#a52b5e5c71832b0bd3c6a5b1fd48583e7a49743d0d438957118b9c6af2e831b209">canOK</a> (zero) if success </dd>
<dd>
<a class="el" href="canstat_8h.html#canERR_xxx">canERR_xxx</a> (negative) if failure </dd></dl>

</div>
</div>
<a id="ga0d1c0e54ea20c3e3b328a32eb10c7b47"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0d1c0e54ea20c3e3b328a32eb10c7b47">&#9670;&nbsp;</a></span>canUnloadLibrary()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="canstat_8h.html#a52b5e5c71832b0bd3c6a5b1fd48583e7">canStatus</a> canUnloadLibrary </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><a class="el" href="group__can__general.html#ga0d1c0e54ea20c3e3b328a32eb10c7b47">canUnloadLibrary()</a> will close all open handles and free allocated memory.</p>
<p>Calling <a class="el" href="group__can__general.html#ga0d1c0e54ea20c3e3b328a32eb10c7b47">canUnloadLibrary()</a> makes any open <a class="el" href="canlib_8h.html#a75f2e3a4c7b1e47c8c6b25b76975b510">CanHandle</a> invalid. The proper procedure for using <a class="el" href="group__can__general.html#ga0d1c0e54ea20c3e3b328a32eb10c7b47">canUnloadLibrary()</a> is:</p>
<ol type="1">
<li>Close all active handles using <a class="el" href="group___c_a_n.html#gaf1786cfbfd542b18b9c599d278837bd9">canBusOff()</a> and <a class="el" href="group___c_a_n.html#ga49525373a4d08d93c651ec10f79dd36b">canClose()</a>.</li>
<li>At this point all handles earlier returned by <a class="el" href="group___c_a_n.html#gac377d182232fb4ec2fed881c2b9ab300">canOpenChannel()</a> should be freed.</li>
<li>Call <a class="el" href="group__can__general.html#ga0d1c0e54ea20c3e3b328a32eb10c7b47">canUnloadLibrary()</a>.</li>
<li>Call <a class="el" href="group__can__general.html#gaff1ec1d3416d3bdd56336a7b9ac008b1">canInitializeLibrary()</a>.</li>
<li>You can now setup your handles to Kvaser devices from scratch (ie. <a class="el" href="group___c_a_n.html#gac377d182232fb4ec2fed881c2b9ab300">canOpenChannel()</a>, <a class="el" href="group___c_a_n.html#ga7eb8c2e92cfae57e7ec5031818524301">canSetBusParams()</a>, <a class="el" href="group___c_a_n.html#ga99c7c99cc71580f8099a1407f4f9ea1a">canBusOn()</a>, etc).</li>
</ol>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="canstat_8h.html#a52b5e5c71832b0bd3c6a5b1fd48583e7a49743d0d438957118b9c6af2e831b209">canOK</a> (zero) if success </dd>
<dd>
<a class="el" href="canstat_8h.html#canERR_xxx">canERR_xxx</a> (negative) if failure</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__can__general.html#gaff1ec1d3416d3bdd56336a7b9ac008b1">canInitializeLibrary()</a> </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="busparams_8c-example.html#a8">busparams.c</a>, <a class="el" href="cancount_8c-example.html#a18">cancount.c</a>, <a class="el" href="canfdmonitor_8c-example.html#a18">canfdmonitor.c</a>, <a class="el" href="canfdwrite_8c-example.html#a19">canfdwrite.c</a>, <a class="el" href="canmonitor_8c-example.html#a32">canmonitor.c</a>, <a class="el" href="example_2c_2busparams_tq_8c-example.html#a17">example/c/busparams_tq.c</a>, <a class="el" href="list_channels_8c-example.html#a16">listChannels.c</a>, <a class="el" href="read_timer_test_8c-example.html#a6">readTimerTest.c</a>, <a class="el" href="simplewrite_8c-example.html#a32">simplewrite.c</a>, and <a class="el" href="writeloop_8c-example.html#a14">writeloop.c</a>.</dd>
</dl>
</div>
</div>
<a id="ga1c6db083e9def9c4d38b4a5226b5f77c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1c6db083e9def9c4d38b4a5226b5f77c">&#9670;&nbsp;</a></span>kvAnnounceIdentityEx()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="canstat_8h.html#a52b5e5c71832b0bd3c6a5b1fd48583e7">canStatus</a> kvAnnounceIdentityEx </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="canlib_8h.html#a75f2e3a4c7b1e47c8c6b25b76975b510">CanHandle</a>&#160;</td>
          <td class="paramname"><em>hnd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>bufsiz</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The <a class="el" href="group__can__general.html#ga1c6db083e9def9c4d38b4a5226b5f77c">kvAnnounceIdentityEx</a> function is used by certain OEM applications.</p>
<dl class="section note"><dt>Note</dt><dd>Not implemented in linux.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">hnd</td><td>An open handle to a CAN channel. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>Type of announcement. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">buf</td><td>A pointer to the data to be sent to the driver. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">bufsiz</td><td>The size, in bytes, of the buffer that buf points to.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="canstat_8h.html#a52b5e5c71832b0bd3c6a5b1fd48583e7a49743d0d438957118b9c6af2e831b209">canOK</a> (zero) if success </dd>
<dd>
<a class="el" href="canstat_8h.html#canERR_xxx">canERR_xxx</a> (negative) if failure </dd></dl>

</div>
</div>
<a id="ga2f80c456dd1653ffe8a9062de3e1ad76"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga2f80c456dd1653ffe8a9062de3e1ad76">&#9670;&nbsp;</a></span>kvDeviceGetMode()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="canstat_8h.html#a52b5e5c71832b0bd3c6a5b1fd48583e7">kvStatus</a> kvDeviceGetMode </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="canlib_8h.html#a75f2e3a4c7b1e47c8c6b25b76975b510">CanHandle</a>&#160;</td>
          <td class="paramname"><em>hnd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>result</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The <a class="el" href="group__can__general.html#ga2f80c456dd1653ffe8a9062de3e1ad76">kvDeviceGetMode()</a> reads the current device's specific mode.</p>
<dl class="section note"><dt>Note</dt><dd>The mode is device specific, which means that not all modes are implemented in all products.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">hnd</td><td>An open handle to a CAN channel. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">result</td><td>A pointer to a 32-bit integer that will receive the <a class="el" href="canlib_8h.html#kvDEVICE_MODE_xxx">kvDEVICE_MODE_xxx</a> value.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="canstat_8h.html#a52b5e5c71832b0bd3c6a5b1fd48583e7a49743d0d438957118b9c6af2e831b209">canOK</a> (zero) if success </dd>
<dd>
<a class="el" href="canstat_8h.html#canERR_xxx">canERR_xxx</a> (negative) if failure</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__can__general.html#ga8ec3c64b63e50ff210294001bdbad7c3">kvDeviceSetMode()</a> </dd></dl>

</div>
</div>
<a id="ga8ec3c64b63e50ff210294001bdbad7c3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8ec3c64b63e50ff210294001bdbad7c3">&#9670;&nbsp;</a></span>kvDeviceSetMode()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="canstat_8h.html#a52b5e5c71832b0bd3c6a5b1fd48583e7">kvStatus</a> kvDeviceSetMode </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="canlib_8h.html#a75f2e3a4c7b1e47c8c6b25b76975b510">CanHandle</a>&#160;</td>
          <td class="paramname"><em>hnd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>mode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The <a class="el" href="group__can__general.html#ga8ec3c64b63e50ff210294001bdbad7c3">kvDeviceSetMode()</a> sets the mode.</p>
<dl class="section note"><dt>Note</dt><dd>The mode is device specific, which means that not all modes are implemented in all products.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">hnd</td><td>An open handle to a CAN channel. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">mode</td><td>One of the <a class="el" href="canlib_8h.html#kvDEVICE_MODE_xxx">kvDEVICE_MODE_xxx</a> constants, defining which mode to use.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="canstat_8h.html#a52b5e5c71832b0bd3c6a5b1fd48583e7a49743d0d438957118b9c6af2e831b209">canOK</a> (zero) if success </dd>
<dd>
<a class="el" href="canstat_8h.html#canERR_xxx">canERR_xxx</a> (negative) if failure</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__can__general.html#ga2f80c456dd1653ffe8a9062de3e1ad76">kvDeviceGetMode()</a> </dd></dl>

</div>
</div>
<a id="gad3d0fc1bf752047f6e24020c478aeffd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad3d0fc1bf752047f6e24020c478aeffd">&#9670;&nbsp;</a></span>kvFlashLeds()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="canstat_8h.html#a52b5e5c71832b0bd3c6a5b1fd48583e7">canStatus</a> kvFlashLeds </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="canlib_8h.html#a75f2e3a4c7b1e47c8c6b25b76975b510">CanHandle</a>&#160;</td>
          <td class="paramname"><em>hnd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>action</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>timeout</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The <a class="el" href="group__can__general.html#gad3d0fc1bf752047f6e24020c478aeffd">kvFlashLeds</a> function will turn the LEDs on the device on or off.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">hnd</td><td></td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">action</td><td>One of the <a class="el" href="canlib_8h.html#kvLED_ACTION_xxx">kvLED_ACTION_xxx</a> constants, defining which LED to turn on or off. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">timeout</td><td>Specifies the time, in milliseconds, during which the action is to be carried out. When the timeout expires, the LED(s) will return to its ordinary function.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="canstat_8h.html#a52b5e5c71832b0bd3c6a5b1fd48583e7a49743d0d438957118b9c6af2e831b209">canOK</a> (zero) if success </dd>
<dd>
<a class="el" href="canstat_8h.html#canERR_xxx">canERR_xxx</a> (negative) if failure </dd></dl>

</div>
</div>
<a id="ga76cb21c1b104f9b679caa3f4cda7424d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga76cb21c1b104f9b679caa3f4cda7424d">&#9670;&nbsp;</a></span>kvGetSupportedInterfaceInfo()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="canstat_8h.html#a52b5e5c71832b0bd3c6a5b1fd48583e7">kvStatus</a> kvGetSupportedInterfaceInfo </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>hwName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>nameLen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>hwType</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>hwBusType</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The <a class="el" href="group__can__general.html#ga76cb21c1b104f9b679caa3f4cda7424d">kvGetSupportedInterfaceInfo</a> function returns information about the different supported hardware types in the installed version of CANlib.</p>
<p>This function is used to enumerate all the supported hardware types in the installed version of CANlib. It does not return a complete list of all supported devices, nor does it return a list of the presently installed hardware. The returned data indicates which device families are supported.</p>
<p>For example, a returned set of data might be: </p><ul>
<li><em>hwType</em> = <a class="el" href="canlib_8h.html#a0f817b0adc81d42c73445e0c26f37151">canHWTYPE_MEMORATOR_PRO</a> </li>
<li><em>hwBusType</em> = <a class="el" href="canlib_8h.html#a90243bb8b778e2bf323ee0c16c0208de">kvBUSTYPE_USB</a> </li>
<li><em>hwName</em> = <code>"Kvaser Memorator Professional"</code> </li>
</ul>
<p>This means that </p><ul>
<li>the presently installed version of CANlib supports members in the Kvaser Memorator Pro family (e.g. the HS/HS and the HS/LS), </li>
<li>the members of the Kvaser Memorator Pro family are USB devices, </li>
<li>the members of the Kvaser Memorator Pro family use the <a class="el" href="canlib_8h.html#a0f817b0adc81d42c73445e0c26f37151">canHWTYPE_MEMORATOR_PRO</a> hardware type.</li>
</ul>
<p>The <a class="el" href="group__can__general.html#ga76cb21c1b104f9b679caa3f4cda7424d">kvGetSupportedInterfaceInfo()</a> function is intended to help application designers build a bus-oriented display of the different installed and/or supported Kvaser devices in the computer.</p>
<dl class="section note"><dt>Note</dt><dd>Not inplemented in linux.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">index</td><td>Use this parameter to enumerate the different supported hardware types. Start with index = 0, and then call <a class="el" href="group__can__general.html#ga76cb21c1b104f9b679caa3f4cda7424d">kvGetSupportedInterfaceInfo</a> again() with index = 1,2,3,... until the function returns an error code. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">hwName</td><td>A pointer to a buffer that will receive the name of the hardware family, as a zero-terminated ASCII string. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">nameLen</td><td>The length of the hwName buffer. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">hwType</td><td>Pointer to a 32-bit integer that will receive the hardware type (one of the <a class="el" href="canlib_8h.html#canHWTYPE_xxx">canHWTYPE_xxx</a> constants.) </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">hwBusType</td><td>Pointer to a 32-bit integer that will receive the bus type (one of the <a class="el" href="canlib_8h.html#kvBUSTYPE_xxx">kvBUSTYPE_xxx</a> constants.)</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="canstat_8h.html#a52b5e5c71832b0bd3c6a5b1fd48583e7a49743d0d438957118b9c6af2e831b209">canOK</a> (zero) if success </dd>
<dd>
<a class="el" href="canstat_8h.html#canERR_xxx">canERR_xxx</a> (negative) if failure</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group___c_a_n.html#ga99c7c99cc71580f8099a1407f4f9ea1a">canBusOn()</a>, <a class="el" href="group___c_a_n.html#gaecc8b56e75cf68548af53b2d432079af">canResetBus()</a> </dd></dl>

</div>
</div>
<a id="ga4a754a72cb9497994b6bc9133ee62282"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4a754a72cb9497994b6bc9133ee62282">&#9670;&nbsp;</a></span>kvReadDeviceCustomerData()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="canstat_8h.html#a52b5e5c71832b0bd3c6a5b1fd48583e7">kvStatus</a> kvReadDeviceCustomerData </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="canlib_8h.html#a75f2e3a4c7b1e47c8c6b25b76975b510">CanHandle</a>&#160;</td>
          <td class="paramname"><em>hnd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>userNumber</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>itemNumber</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>bufsiz</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Reading customer data works with Kvaser Leaf (of all types), Kvaser USBcan Professional, Kvaser Memorator Professional, Kvaser Eagle and Kvaser Memorator Light. To write customer data use external tools.</p>
<dl class="section note"><dt>Note</dt><dd>Not implemented in linux.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">hnd</td><td>An open handle to a CAN channel. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">userNumber</td><td>Assigned by Kvaser. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">itemNumber</td><td>Must be zero (reserved) </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">data</td><td>A pointer to a buffer of up to 8 bytes where the result will be placed. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">bufsiz</td><td>The size of the buffer that data points at.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="canstat_8h.html#a52b5e5c71832b0bd3c6a5b1fd48583e7a49743d0d438957118b9c6af2e831b209">canOK</a> (zero) if success </dd>
<dd>
<a class="el" href="canstat_8h.html#canERR_xxx">canERR_xxx</a> (negative) if failure </dd></dl>

</div>
</div>
<a id="ga0671078a6184ab2b73287946a49763f2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0671078a6184ab2b73287946a49763f2">&#9670;&nbsp;</a></span>kvReadTimer()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="canstat_8h.html#a52b5e5c71832b0bd3c6a5b1fd48583e7">kvStatus</a> kvReadTimer </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="canlib_8h.html#a75f2e3a4c7b1e47c8c6b25b76975b510">CanHandle</a>&#160;</td>
          <td class="paramname"><em>hnd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int *&#160;</td>
          <td class="paramname"><em>time</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The <a class="el" href="group__can__general.html#ga0671078a6184ab2b73287946a49763f2">kvReadTimer</a> reads the hardware clock on the specified device and returns the value.</p>
<p>When the call to <a class="el" href="group__can__general.html#ga0671078a6184ab2b73287946a49763f2">kvReadTimer()</a> returns, the time value is already obsolete. The time required for the device firmware, any intermediary buses (like USB,) and the operating system to return the time value is not defined.</p>
<p>This call should be used instead of <a class="el" href="canlib_8h.html#a04c2f80a23b992bf17591749192e8d48">canReadTimer()</a> because it can return an error code if it fails.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">hnd</td><td>An open handle to a CAN channel. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">time</td><td>A pointer to a 32-bit unsigned integer that will receive the time value.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="canstat_8h.html#a52b5e5c71832b0bd3c6a5b1fd48583e7a49743d0d438957118b9c6af2e831b209">canOK</a> (zero) if success </dd>
<dd>
<a class="el" href="canstat_8h.html#canERR_xxx">canERR_xxx</a> (negative) if failure</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="canlib_8h.html#a04c2f80a23b992bf17591749192e8d48">canReadTimer()</a>, <a class="el" href="group__can__general.html#gafa060c0f78d459498d1f6236e2d0b5ae">kvReadTimer64()</a> </dd></dl>

</div>
</div>
<a id="gafa060c0f78d459498d1f6236e2d0b5ae"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gafa060c0f78d459498d1f6236e2d0b5ae">&#9670;&nbsp;</a></span>kvReadTimer64()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="canstat_8h.html#a52b5e5c71832b0bd3c6a5b1fd48583e7">kvStatus</a> kvReadTimer64 </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="canlib_8h.html#a75f2e3a4c7b1e47c8c6b25b76975b510">CanHandle</a>&#160;</td>
          <td class="paramname"><em>hnd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint64_t *&#160;</td>
          <td class="paramname"><em>time</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The <a class="el" href="group__can__general.html#gafa060c0f78d459498d1f6236e2d0b5ae">kvReadTimer64</a> reads the hardware clock on the specified device and returns the value.</p>
<p>When the call to <a class="el" href="group__can__general.html#gafa060c0f78d459498d1f6236e2d0b5ae">kvReadTimer64()</a> returns, the time value is already obsolete. The time required for the device firmware, any intermediary buses (like USB,) and the operating system to return the time value is not defined.</p>
<p>This call should be used instead of <a class="el" href="canlib_8h.html#a04c2f80a23b992bf17591749192e8d48">canReadTimer()</a> because it can return an error code if it fails.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">hnd</td><td>An open handle to a CAN channel. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">time</td><td>A pointer to a 64-bit unsigned integer that will receive the time value.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="canstat_8h.html#a52b5e5c71832b0bd3c6a5b1fd48583e7a49743d0d438957118b9c6af2e831b209">canOK</a> (zero) if success </dd>
<dd>
<a class="el" href="canstat_8h.html#canERR_xxx">canERR_xxx</a> (negative) if failure</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__can__general.html#ga0671078a6184ab2b73287946a49763f2">kvReadTimer()</a>, <a class="el" href="canlib_8h.html#a04c2f80a23b992bf17591749192e8d48">canReadTimer()</a> </dd></dl>

</div>
</div>
<a id="ga99976c5b8e2c534b27bf9ec2e715d8d3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga99976c5b8e2c534b27bf9ec2e715d8d3">&#9670;&nbsp;</a></span>kvSetNotifyCallback()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="canstat_8h.html#a52b5e5c71832b0bd3c6a5b1fd48583e7">kvStatus</a> kvSetNotifyCallback </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="canlib_8h.html#a75f2e3a4c7b1e47c8c6b25b76975b510">CanHandle</a>&#160;</td>
          <td class="paramname"><em>hnd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="canlib_8h.html#a7e926c0359a2caa6b9a663a333bab78d">kvCallback_t</a>&#160;</td>
          <td class="paramname"><em>callback</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>context</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>notifyFlags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The <a class="el" href="group__can__general.html#ga99976c5b8e2c534b27bf9ec2e715d8d3">kvSetNotifyCallback()</a> function registers a callback function which is called when certain events occur.</p>
<p>You can register at most one callback function per handle at any time.</p>
<p>To remove the callback, call <a class="el" href="group__can__general.html#ga99976c5b8e2c534b27bf9ec2e715d8d3">kvSetNotifyCallback()</a> with a <code>NULL</code> pointer in the callback argument.</p>
<dl class="section note"><dt>Note</dt><dd>The callback function is called in the context of a high-priority thread created by CANlib. You should take precaution not to do any time consuming tasks in the callback. You must also arrange the synchronization between the callback and your other threads yourself.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">hnd</td><td>An open handle to a CAN channel. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">callback</td><td>A pointer to a callback function of type <a class="el" href="canlib_8h.html#a7e926c0359a2caa6b9a663a333bab78d">kvCallback_t</a> </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">context</td><td>A pointer to arbitrary user-defined context data which is passed to the callback function. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">notifyFlags</td><td>One or more of the <a class="el" href="canstat_8h.html#canNOTIFY_xxx">canNOTIFY_xxx</a> flags.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="canstat_8h.html#a52b5e5c71832b0bd3c6a5b1fd48583e7a49743d0d438957118b9c6af2e831b209">canOK</a> (zero) if success </dd>
<dd>
<a class="el" href="canstat_8h.html#canERR_xxx">canERR_xxx</a> (negative) if failure</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group___c_a_n.html#gaa5dd0f277c7059169055321fbda87486">canSetNotify()</a> </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.13-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer"> (canlib 5.38) Tue Feb 15 2022</li>
  </ul>
</div>
</body>
</html>
